/**
 * Author: Todd Kerpelman
 * Date: 6/18/12
 * Time: 3:07 PM
 *
 * Copyright 2012 Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package net.kerp.hangoutSpace {
import net.kerp.ToddUtils;
import com.greensock.TweenLite;


/**
 * A "wind" object that is referred to by the scrolling background and
 * space trails to make everything kinda move in the same direction
 *
 */
public class SpaceWind {
  private var _windX:Number;
  private var _windY:Number;

  
  public function SpaceWind() {
    _windX= 0.0;
    _windY = 0.0;
    changeWind();
  }


  private function changeWind():void {
    TweenLite.to(this, 4.0, {windX: ToddUtils.randomNum(-2,2), windY: ToddUtils.randomNum(-2,2)});
    TweenLite.delayedCall(ToddUtils.randomNum(10, 12), changeWind);
  }


  public function get windX():Number {
    return _windX;
  }

  public function set windX(value:Number):void {
    _windX = value;
  }

  public function get windY():Number {
    return _windY;
  }

  public function set windY(value:Number):void {
    _windY = value;
  }
}
}
